package org.example.rowing.enums;

public enum MedalTypeEnum {
    GOLD("金牌"),
    SILVER("银牌"),
    BRONZE("铜牌");

    private final String displayName;

    MedalTypeEnum(String displayName) {
        this.displayName = displayName;
    }

    public String getDisplayName() {
        return displayName;
    }

    public static MedalTypeEnum fromDisplayName(String displayName) {
        for (MedalTypeEnum boatType : values()) {
            if (boatType.displayName.equals(displayName)) {
                return boatType;
            }
        }
        throw new IllegalArgumentException("Invalid display name: " + displayName);
    }
}
